package liuyao.webutils.controller;

import liuyao.webutils.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/demo")
public class DemoController {

	@Autowired
	DemoService demoService;

	@GetMapping("/test")
	public String test(HttpServletRequest request, HttpServletResponse response){
		return demoService.getSysSenderName(11, null,1, (byte) 2, (short) 3, 4, 5.0, 6.0F, 'a', false, null);
	}

	@GetMapping("/test2")
	public String test2(HttpServletRequest request, HttpServletResponse response){
		return demoService.getSysSenderName();
	}

	@GetMapping("/test3")
	public String test3(HttpServletRequest request, HttpServletResponse response){
		 demoService.getSysSenderNameV();
		return "test3";
	}
}
